﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebApplication.Models
{
    /*
     *  用于向前台传递结果   —— Anthony
     */

    public class ResultModel
    {
        /// <summary>
        /// 消息
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// 数据
        /// </summary>
        public object Data { get; set; }

        /// <summary>
        /// 结果类型
        /// </summary>
        public string Result { get; set; }

        /// <summary>
        /// 总数量
        /// </summary>
        public int Total { get; set; }

        /// <summary>
        /// 成功数量
        /// </summary>
        public int SucNum { get; set; }
    }

    public enum ResultType
    {
        /// <summary>
        /// 消息结果类型
        /// </summary>
        Info,
        /// <summary>
        /// 成功结果类型
        /// </summary>
        Success,
        /// <summary>
        /// 警告结果类型
        /// </summary>
        Warning,
        /// <summary>
        /// 异常结果类型
        /// </summary>
        Error
    }
}
